<?php

namespace App\Enums\OpenShop;

class BaseEnum
{
    const HOLIDAY_FALSE = 1;
    const HOLIDAY_TRUE  = 2;

    const HOLIDAY_MAPPING = [
        self::HOLIDAY_FALSE => '工作日',
        self::HOLIDAY_TRUE  => '节假日',
    ];

    const WEEK_MONDAY    = 1;
    const WEEK_TUESDAY   = 2;
    const WEEK_WEDNESDAY = 3;
    const WEEK_THURSDAY  = 4;
    const WEEK_FRIDAY    = 5;
    const WEEK_SATURDAY  = 6;
    const WEEK_SUNDAY    = 7;

    const WEEK_MAPPING = [
        self::WEEK_MONDAY    => '星期一',
        self::WEEK_TUESDAY   => '星期二',
        self::WEEK_WEDNESDAY => '星期三',
        self::WEEK_THURSDAY  => '星期四',
        self::WEEK_FRIDAY    => '星期五',
        self::WEEK_SATURDAY  => '星期六',
        self::WEEK_SUNDAY    => '星期日',
    ];

    const WEEK_MAPPING_REVERSE = [
        '星期一' => self::WEEK_MONDAY,
        '星期二' => self::WEEK_TUESDAY,
        '星期三' => self::WEEK_WEDNESDAY,
        '星期四' => self::WEEK_THURSDAY,
        '星期五' => self::WEEK_FRIDAY,
        '星期六' => self::WEEK_SATURDAY,
        '星期日' => self::WEEK_SUNDAY,
    ];

    //周末的范围
    const WEEKEND = [6, 7];
}
